onStartNestedScroll

open fun onStartNestedScroll(@NonNull parent: ViewParent, @NonNull child: View, @NonNull target: View, nestedScrollAxes: Int): Boolean(source)

React to a descendant view initiating a nestable scroll operation, claiming the nested scroll operation if appropriate.

This version of the method just calls onStartNestedScroll using the touch input type.

Return

true if this ViewParent accepts the nested scroll operation

Parameters

parent

ViewParent that contains the child view.

child

Direct child of this ViewParent containing target

target

View that initiated the nested scroll

nestedScrollAxes

Flags consisting of SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_VERTICAL or both


open fun onStartNestedScroll(@NonNull parent: ViewParent, @NonNull child: View, @NonNull target: View, nestedScrollAxes: Int, type: Int): Boolean(source)

React to a descendant view initiating a nestable scroll operation, claiming the nested scroll operation if appropriate.

This method will be called in response to a descendant view invoking startNestedScroll. Each parent up the view hierarchy will be given an opportunity to respond and claim the nested scrolling operation by returning true.

This method may be overridden by ViewParent implementations to indicate when the view is willing to support a nested scrolling operation that is about to begin. If it returns true, this ViewParent will become the target view's nested scrolling parent for the duration of the scroll operation in progress. When the nested scroll is finished this ViewParent will receive a call to onStopNestedScroll.

Return

true if this ViewParent accepts the nested scroll operation

Parameters

parent

ViewParent that contains the child view.

child

Direct child of this ViewParent containing target

target

View that initiated the nested scroll

nestedScrollAxes

Flags consisting of SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_VERTICAL or both

type

the type of input which cause this scroll event